package io.renren.common.msg;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * Created by czh on 2020/7/7 11:44
 *
 * @author chengzhenhua
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "响应体定义")
public class Response<T> {

    /**
     * 0-失败 1-成功
     */
    @ApiModelProperty(value = "0-失败 1-成功", example = "1")
    private String code;
    /**
     * 返回描述
     */
    @ApiModelProperty(value = "当code=0时，失败信息")
    private String msg;
    /**
     * 业务编码
     */
    @ApiModelProperty(value = "失败业务编码，除非接口特别说明，否则一般没意义", example = "0000")
    private String businessCode;
    /**
     * 返回的具体数据
     */
    @ApiModelProperty(value = "响应体数据")
    private T data;

}